all:1 2 3

CC=gcc
FLAG1= -lpaho-mqtt3c -lm -lpthread
FLAG2= -lpthread -lpaho-mqtt3c -lm
FLAG3= -lpthread -lm

1:device_process.c pthread.c mqtt.c shm.c msg_handler.c  cJSON.c msg_queue.c
	$(CC) $^ -o $@ $(FLAG1)
2:yuanyuzhou.c yuan_pthread.c yuan_mqtt.c shm.c msg_handler.c cJSON.c
	$(CC) $^ $(FLAG2) -o $@
3:cJSON.c msg_queue.c my_pthread.c shm.c tcp.c 
	$(CC) $^ -o $@ $(FLAG3)

clean:
	rm -rf 1 2 3




